let env = 'online' // 在线运行
if(window.location.href.indexOf(':9099') !== -1) {
    env = 'local' // 本地服务器运行(npm run dev)
}
if(window.location.href.indexOf('file://') !== -1) {
    env = 'file' // 本地无host运行
}

let host = {
    online: `${window.location.origin}`,
    local: `${window.location.origin}/dist`,
    file: window.location.href.split('index.html')[0]
}
host = host[env]

export {
    env,
    host
}